#!/bin/sh

dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)

if [[ $dir == /cygdrive/* && $(which php) == /cygdrive/* ]]; then    
    # cygwin paths for windows PHP must be translated
    dir=$(cygpath -m "$dir");    
fi

php "${dir}/composer.phar" "$@"
